﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibraryManagement
{
    public class SQLQueries
    {

        public const String GetVACompanyList = @"SELECT 
                                                    c.id,c.name +'('+b.name+')' as ComapanyName ,c.group_id
                                                FROM 
                                                    VariableAnnuity.companies C
                                                    Inner Join 
                                                    Annuity.Cfg_Organization O
                                                    On
                                                    C.id = O.BeaconId And Product_Type =1 
                                                    Inner join
                                                    [VariableAnnuity].[business_groups] b
                                                    ON 
                                                    b.id = C.group_id
                                                ORDER BY 
                                                    ComapanyName ";

        public const String GetVAProductList = "SELECT  id as Product_Id,CASE [is_terminated] When '1' Then product_name + '*' when '0' then product_name End As Product_Name FROM [VariableAnnuity].[va_products] Where company_id = @CompanyId order by is_terminated,Product_Name";
        public const String GetMaxSetId = "Select ISNull(MAX(SetId),0) From Annuity.Cfg_BenefitDescriptions";

       
    }
}
